create external table spmi_dws.dws_volume_cost_profit_sum_dt (
waybill_date                               date              COMMENT '运单录入日期',
entry_mark_date                            date              COMMENT '入账日期',
create_date                                date              COMMENT '账单产生日期',
destination_province_name                  String            COMMENT '目的省份名称',
destination_province_id                    String            COMMENT '目的省份id',
customer_code                              String            COMMENT '客户编码',
customer_name                              String            COMMENT '客户名称',
send_network_name                          String            COMMENT '寄件网点名称',
send_network_code                          String            COMMENT '寄件网点编码',
send_financial_center_name                 String            COMMENT '寄件代理区名称',
send_financial_center_code                 String            COMMENT '寄件代理区编码',
operation_network_name                     String            COMMENT '操作网点名称',
operation_network_code                     String            COMMENT '操作网点编码',
operation_financial_center_name            String            COMMENT '操作代理区名称',
operation_financial_center_code            String            COMMENT '操作代理区编码',
start_financial_center_name                String            COMMENT '始发代理区名称',
start_financial_center_code                String            COMMENT '始发代理区编码',
piece_network_name                         String            COMMENT '派件网点名称',
piece_network_code                         String            COMMENT '派件网点编码',
piece_financial_center_name                String            COMMENT '派件代理区名称',
piece_financial_center_code                String            COMMENT '派件代理区编码',
fee_type_name                              String            COMMENT '费用类型名称',
fee_type_code                              String            COMMENT '费用类型编码',
waybill_votes                              bigint            COMMENT '总运单票数',
warehousing_weight_sum                     decimal(21,2)     COMMENT '总入仓重量',
cost_weight_sum                            decimal(21,2)     COMMENT '总计费重量',
settle_weight_sum                          decimal(21,2)     COMMENT '总结算重量',
fee_cost_sum                               decimal(21,6)     COMMENT '总费用'
)
COMMENT '量本利基础汇总表'
PARTITIONED BY (
       table_type STRING COMMENT '表分类' ,
       dt STRING COMMENT '运单生成日期 (yyyy-MM-dd)' )
STORED AS PARQUET
LOCATION '/dw/hive/spmi_dws.db/external/dws_volume_cost_profit_sum_dt'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);